package com.suyuan.dao;

import com.suyuan.entity.CustomAddr;
import com.suyuan.entity.CustomAddrExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;

public interface CustomAddrMapper {
    int countByExample(CustomAddrExample example);

    int deleteByExample(CustomAddrExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(CustomAddr record);

    int insertSelective(CustomAddr record);

    List<CustomAddr> selectByExample(CustomAddrExample example);

    CustomAddr selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") CustomAddr record, @Param("example") CustomAddrExample example);

    int updateByExample(@Param("record") CustomAddr record, @Param("example") CustomAddrExample example);

    int updateByPrimaryKeySelective(CustomAddr record);

    int updateByPrimaryKey(CustomAddr record);
    /**
     * 根据用户id查询该用户所有地址
     * @param id
     * @return
     */
    public List<CustomAddr> findAddrById(Integer id);

    /**
     * 根据地址id查询指定地址对象
     * @param id
     * @return
     */
    CustomAddr findOne(Integer id);

    int updateAddr(CustomAddr addr);

    int deleteAddr(@Param("id")Integer id);

    int insertAddr(@Param("cusId")Integer cusId,@Param("addr")String addr,@Param("receName")String receName,@Param("recePhone")String recePhone);
}